GMail Drive

Copyright 2004 - 2008 by Bjarke Viksoe

Version 1.0.13
Download the latest version of GMail Drive from www.viksoe.dk/gmail/.

GMail Drive is a Shell Namespace Extension that creates a virtual drive in the Windows Explorer, allowing you to use your Google Mail account as a storage medium.

It allows you to do basic file manipulation, such as copy and delete of files inside the Google Mail account. Because it is a Shell Extension, the interface you work in is Windows Explorer itself.

GMail Drive appears as a virtual drive under your My Computer folder in Windows Explorer.

You can:
Navigate between files and folders using the familiar Explorer folder view.
Do basic file manipulations, such as create folders and delete files.
Use copy and paste as you would normally do in Explorer to copy files around.
Use drag'n'drop to quickly move files between folders.
Show information about volumes and files using the Properties dialogs.

Please read the FAQ (Frequently Asked Questions) page. And check the list of Bugs and Limitations and how to contact me. I also welcome bug reports and feedback.


How It Works

GMail Drive works by directly manipulating emails inside your Google Mail account.

When you copy a file to the GMail Drive folder, it internally creates and sends an e-mail to your account. The file content is sent as an e-mail attachment.
When the Shell Extension needs to display a directory listing of your Gmail account, it submits a Gmail search query using the sparsely documented Gmail Protocol API. It searches for all e-mails starting with the word "GMAILFS". From the returned search result, it builds a directory structure, which is displayed in Window Explorer.

Because all GMail Drive files appear as regular e-mails in your Google Mail account, you may want to set up a Gmail filter that automatically moves all e-mails containing "GMAILFS" to the archived folder. This way, GMail Drive files won't clutter up your Gmail account.

A typical GMail File looks like this inside your Gmail account:

GMAILFS: /folder/filename.txt [123;n;1]

You can find the actual file content inside each mail as an e-mail attachment.

The file size is limited to 20 Mb because this is the attachment size limit Google imposes on all mails. Since the filename must be available on the message subject line, the full filename length is limited to about 65 characters.

A bit of care must be taken to avoid sending mails that are caught by Google's spam filter, and to respect the Google Gmail "Terms of Use" policy.


Restrictions

Before you start copying files to your new GMail Drive, please make sure to familiarize yourself with the Google Gmail Terms of Use. Google provides the Gmail mail service for free, so do make sure to respect their wishes for the benefit of all Gmail users.

Among other things, this means you cannot:

  • Transmit content that may be harmful to minors.
  • Use the Gmail Service in connection with illegal peer-to-peer file sharing.
  • Illegally transmit another's intellectual property or other proprietary information without such owner's or licensor's permission.
  • Promote or encourage illegal activity.

The GMail Drive tool is not in any way endorsed by Google. It is still considered an experimental tool. Do not copy sensitive data or rely on this tool as a secure backup solution. I cannot guarantee that files stored in this manner will be accessible in the future. You are using this tool on your own risk.


Frequently Asked Questions

Here is a list of frequently asked questions and answer:

Q: Why is there a 65 character filename limitation?
A: Because the filename must be stored in the subject line of each mail. Gmail only shows about 85 characters in the subject field. It allows GMail Drive to enumerate the files quickly - instead of having to read every single mail which would be very slow.

Q: Why is there a 20 Mb filesize limit?
A: Because Google imposes a 20 Mb mail attachment limit.

Q: I believe the Gmail attachment limit is > 20 Mb?
A: Yes, it appears that some Gmail servers accepts around 24 Mb. The official limit is still 20 Mb though.

Q: How do I prevent files/mails from being forwarded to my POP3 account?
A: The Use Draft Folder option in GMail Drive will put mails in the draft folder instead. This way, the mails generated will not be forwarded when you have the POP3 option enabled in Gmail.

Q: Can I use it from a USB memory stick?
A: Well, if you mean without installing the tool through the setup.exe, then No. Installation is required since GMail Drive needs to put information in the Windows System Registry.

Q: I cannot connect?
A: Please refer to the Problems with connecting topic. Also make sure to always have the latest version of the tool installed.

Q: How can I map a drive letter?
A: A Shell Namespace Extension does not have the ability to map a drive letter.

Q: Why doesn't my backup software work with the tool?
A: See answer about mapping a drive letter. Your software may be accessing files on your harddrive using old DOS style instead of the modern shell-style. Genuine Windows software, such as the Total Commander filemanager, works just fine with GMail Drive.

Q: How can I access GMail Drive from a command line?
A: I'm not familiar with any command line tool, but you can script it.

Q: Will you provide automatic splitting of files so it is possible to store files larger than 20 Mb?
A: No, I'm sure Google put the attachment size limit there for a reason.

Q: Will you create a drive for {name of webmail offering xxx Gb storage} too?
A: No. I have no plans to create drives for other webmail vendors.

Q: Can I have multiple drives?
A: GMail Drive only supports a single drive. You can experiment with turning off Auto-Login and create a Windows shortcut on the desktop with the following line (one line):
%windir%\explorer.exe /separate,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{2B3453E4-49DF-11D3-8229-0080BE509050}

Q: Does it work on Windows 64-bit?
A: GMail Drive installs an icon on the desktop that may work. You will not see it in the My Computer folder.

Q: Are my files safe?
A: When you use the "Use Secure HTTP"-option in GMail Drive, data is encrypted while being transferred on the internet. The mails themselves are not stored with encryption. Also I cannot guarantee that files can be accessed in the future if Google decides to block the tool.

Q: Can I have the source code, please?
A: The source code has not been released, but it might be some time in the future. If you want to study Shell Namespace Extensions you can find another sample, ADF View, on my website that includes GPL'd source code.


Navigating files and folders

You navigate between files and folders as you would normally do in the Windows Explorer.

Depending on how you launched the Windows Explorer you will either get a folder tree and a file list, or just a file list. To control which mode you start in, choose either Open or Explore in the Explorer's right-click menu.

To navigate into a folder, simply double-click on it. If you see the folder in the folder tree, you can click on it there. GMail Drive respects your settings in Windows Explorer, so if you have configured one-click activation of folders, this is what you get.

The file list will display all the folders and files in the current directory of your GMail Drive.
Like your regular Explorer view, you can choose from different file list modes. The Large Icons list mode gives the usual icon view, while the Details mode shows various file attributes in a grid fashion. On Windows Vista you can choose the Tile mode to see both icons and various file details in the list.
Note that the Shell Extension will not show the file attribute column in the file list, if you do not have the Show Attribute column checked in the Explorer's Folder options dialog.


Copying Files

You copy files using the normal Windows Explorer tricks.

To copy files; select the files in the list. Then choose Copy from the right-click menu. To paste the files, navigate to the destination folder and choose the Paste menu-item.

You can also just drag the files and drop them on the destination folder.
By default GMail Drive copies files during drag'n'drop operations, but you can control the effect by using the SHIFT and CTRL keys when dragging.
You can drag files to any Windows Explorer folder - even some 3rd party programs accept files being dragged onto their window.


Deleting Files

You delete files as you do with regular files in the Windows Explorer.

You can delete a file by selecting the Delete menu-item in the File menu or pressing the Delete key. You can delete multiple files by high-lighting multiple entries in the Explorer view.

You may also delete files by dragging them to the Windows Recycle Bin. The files will however not be put inside the Recycle Bin, so you cannot undo the delete action.

GMail Drive does not support Rename of files.


Showing Properties

You can get additional information about files and folders by displaying their Properties dialog. To do so, select a file and either choose the Properties menu-item in the File menu, or right-click on the item and choose Properties in the popup menu.

If you choose the Properties menu-item when no files or folders are selected, information about the current directory is displayed.

If you choose the Properties menu-item on the root folder of the GMail Drive, a Property Page will be shown with general information about the GMail volume and account.


Changing User

To change the Gmail login credentials, you can use the Login As... menuitem under the File menu. Place a checkmark in the Auto Login entry to automatically login when the folder is activated. Your username and password are securely stored in the System Registry with encryption.

If you are behind a proxy, the tool will use the Proxy Settings of your Microsoft Internet Explorer browser. If proxy authentication (username and password) is needed, you can add this information to the Login dialog under the More button panel.

Only one user can be logged in at any time. This allows GMail Drive to optimize the folder cache it holds during file activity.


Launching Files

You can launch files by double-clicking on them in the filelist. All files are stored on your Gmail account so the file must be transferred to your computer before it can be launched.

When you double-click on a file, a local file is created and then launched on your computer. You can only launch one file at the time. While transferring a file to your local computer for launch, you will not be able to launch a second file simultaneously or initiate another copy'n'paste session. If you modify the file and save it, the changes are only transferred back to your Gmail storage when you exit the program you're viewing the file in.

You can also open files from inside regular Windows programs using the Open With... dialog. Currently, opening files from inside the Microsoft Office products may not work with GMail Drive.


Problems with connecting

If you have problems when connecting to the Gmail service you should check the following:

Make sure you entered the correct username and password. Try to use the same login credentials on the Gmail webinterface and see if you can login there. Use your complete e-mail address in the username field if you have a googlemail.com or Google Apps (hosted) address.

Make sure that the correct proxy settings are configured in the MS Internet Explorer settings. If you are behind a proxy that requires you to enter user authentication (username and password) you can add this information under the More button in the Login dialog in GMail Drive.

Make sure that your local firewall (Windows built-in) does not block explorer.exe (Windows Explorer) from accessing the internet. GMail Drive lives inside the Windows Explorer most of the time.
If you see an "Unspecified potential security flaw" warning, it's because Microsoft Windows Update rolled out patch KB921398. Apparently you can avoid this error by adding the gmail.com and google.com domains to the Trusted Site list in Internet Explorer.

Make sure that you set your cookie level inside Internet Explorer to a reasonable low level, or at least allow gmail.com and google.com domains to set cookies in Internet Explorer.

Make sure that you do not have any 3rd party applications enabled that block or interfere with the internet connection. It has been seen that some ad-stripping tools will remove cookies from the connection.


Uninstalling GMail Drive

The uninstall option is located under the Add/Remove Programs applet in the Windows Control Panel.

On Windows XP computers you can open the My Computer folder and choose the Add or Remove Programs item directly from the menu on the left (the System Task panel).

On Windows Vista you'll need to go to the Control Panel, and there find the option to Remove Programs.


Bugs and Limitations

GMail Drive is still under development. There may still be bugs and features that need correction.

Known bugs:
The "Address" pane does not automatically update on Windows 98.
The context menu for the root item does not appear on Windows 95/98.

Known limitations:
Desktop is sometimes "blocked" while copying files.
Filename length (including paths) is limited to 65 characters.
Google limits the attachment size to 20Mb.

If you find any bugs, please take the time to report them.


Credits

GMail Drive was created by Bjarke Viksoe.

GMail Login logo by Henrique Gusso (DoS)
Animations by Jay Hilwig

This help file was created in Oasis SE (freeware).
Web-link: www.adept.co.za/~oasisdev/

Thanks to:
Original idea by Richard Jones.
Google for Gmail.


Feedback

If you use this Shell Extension I would be very interested in hearing your opinion. I can be contacted on the following e-mail address: bjarke@viksoe.dk.

If you find any bugs, please take the time to report them to me. Enclose a short description of how to reproduce it.

Regards
Bjarke Viksoe


GMail Drive
Copyright 2004 - 2008 by Bjarke Viksoe

GMail Drive is a Shell Namespace Extension that creates a virtual drive in the Windows Explorer, allowing you to use your Google Mail account as a storage medium.

It allows you to do basic file manipulation, such as copy and delete, on files inside the GMail folder. Because it is a Shell Extension, the interface you work in is Windows Explorer itself.

GMail files are physically stored as e-mails on your Google Mail account. The files are stored in mail attachments, and the filename and file information (such as filesize) is stored in the message subject line.

GMail Drive has already been installed on your computer. All you need to do now, is to browse to the GMail Drive entry under your My Computer folder in the Windows Explorer.

GMail Drive - Gmail Shell Namespace Extension
Copyright(C) 2004 - 2008 Bjarke Viksoe <bjarke@viksoe.dk>

This software, including all accompanying files, is provided "AS IS" and without any warranties as to performance or merchantability or any other warranties whether expressed or implied.

Because of the various hardware and software environments into which the GMail Drive software (this Software) may be put, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS PROVIDED.

Good data processing policies suggest that any program should be thoroughly tested with non-critical data before relying on it. The user assumes the entire risk of using this program.


Script Sample

The following VBScript will access GMail Drive and copy one file on Windows XP. Save the script in a file with the .vbs file-extension and double-click to test it.

MYCOMPUTER = &H11
Set sa = CreateObject("Shell.Application")
Set myComputer = sa.NameSpace(MYCOMPUTER)

GmailPath=""

For Each fi in myComputer.Items
      If fi.Name="GMail Drive" then
            GmailPath=fi.Path
            Exit For
      End If
Next

If GmailPath="" Then
      wscript.echo "Could not find GMail Drive Path."
      wscript.quit
end if

Set myGmail = sa.NameSpace(GmailPath)
if myGmail is Nothing Then
      wscript.echo "Could not open Gmail Drive"
      wscript.quit
end if

wscript.echo "Will copy file: C:\Temp\Test.txt"

myGmail.CopyHere "C:\Temp\Test.txt", 0